home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / lib / partman / fstab.d / reiserfs < prev    next >
Text File  |  2008-03-21  |  1KB  |  57 lines

  1. #!/bin/sh
  2.  
  3. . /lib/partman/lib/base.sh
  4.  
  5. has_boot=no
  6. for dev in $DEVICES/*; do
  7.     [ -d $dev ] || continue
  8.     cd $dev
  9.     open_dialog PARTITIONS
  10.     while { read_line num id size type fs path name; [ "$id" ]; }; do
  11.         [ $fs != free ] || continue
  12.         [ -f "$id/method" ] || continue
  13.         [ -f "$id/acting_filesystem" ] || continue
  14.         [ -f "$id/mountpoint" ] || continue
  15.         mountpoint=$(cat $id/mountpoint)
  16.         if [ "$mountpoint" = /boot ]; then
  17.             has_boot=yes
  18.         fi
  19.     done
  20.     close_dialog
  21. done
  22.  
  23. for dev in $DEVICES/*; do
  24.     [ -d $dev ] || continue
  25.     cd $dev
  26.     open_dialog PARTITIONS
  27.     while { read_line num id size type fs path name; [ "$id" ]; }; do
  28.         [ $fs != free ] || continue
  29.         [ -f "$id/method" ] || continue
  30.         [ -f "$id/acting_filesystem" ] || continue
  31.         [ -f "$id/mountpoint" ] || continue
  32.         mountpoint=$(cat $id/mountpoint)
  33.         filesystem=$(cat $id/acting_filesystem)
  34.         case "$filesystem" in
  35.             reiserfs)
  36.             # due to #249322, #255135, #258117:
  37.             if [ "$mountpoint" = /tmp ]; then
  38.                 rm -f $id/options/noexec
  39.             fi
  40.             # grub and lilo (others?) fail without notail
  41.             if [ "$mountpoint" = /boot ] || \
  42.                ([ "$mountpoint" = / ] && [ "$has_boot" = no ]); then
  43.                 > $id/options/notail
  44.             fi
  45.             options=$(get_mountoptions $dev $id)
  46.             if [ "$mountpoint" = / ]; then
  47.                 pass=1
  48.             else
  49.                 pass=2
  50.             fi
  51.             echo "$path" "$mountpoint" reiserfs $options 0 $pass
  52.             ;;
  53.         esac
  54.     done
  55.     close_dialog
  56. done
  57.